﻿using AMAP.Domain;
using AMAP.ServiceClasses.Common;
using AMAP.ServiceInterfaces;
using AMAP.ServiceInterfaces.Common;
using System.Collections.Generic;
using System.Linq;

namespace AMAP.ServiceClasses
{
    public class OrderService : BaseRepositoryService<Order>, IOrderService
    {
        public OrderService(IDatabaseFactory databaseFactory)
            : base(databaseFactory)
        {
        }

        public IList<Order> GetStock()
        {
            return this.dataContext.OrderSet.Where(o => o.RemainedQuantity > 0).ToList<Order>();
        }
    }
}
